import 'package:flutter/material.dart';

class ReOrderScrollViewPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('re order able list view'),
        ),
        body: ReorderableListView(
          onReorder: (int oldIndex, int newIndex) {
            print('$oldIndex to $newIndex');
          },
          children: List.generate(
              20,
              (index) => Container(
                    color: Colors.red,
                    height: 30,
                    key: UniqueKey(),
                    alignment: Alignment.center,
                    child: Text(
                      '$index',
                      style: TextStyle(fontSize: 20),
                    ),
                  )),
        ));
  }
}
